/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-06-01
 * Time: 14:54
 */
class MyArray{
    Object[] objects = new Object[10];

    public Object getVal(int pos){
        return objects[pos];
    }
    public void setVal(int pos,Object val){
        objects[pos] = val;
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray myArray = new MyArray();
        myArray.setVal(0,1);
        myArray.setVal(1,"hello");

        String s = (String)myArray.getVal(1);
        System.out.println(s);
    }
}
